/*
    This file is part of the Time-of-Flight Tracer program. It is not part of
    the original PBRT source distribution. See the included license file for
    more information.

    Copyright(c) 2014 Microsoft Corporation

    Author: Phil Pitts
*/

#if defined(_MSC_VER)
#pragma once
#endif

#ifndef PBRT_CORE_INTEGRATIONRESULT_H
#define PBRT_CORE_INTEGRATIONRESULT_H

#include "pbrt.h"
#include "sampler.h"
#include "spectrum.h"


// Structure allows Integrators to return other data besides simple radiances
struct IntegrationResult {
	IntegrationResult();
	IntegrationResult(const IntegrationResult &other);
	IntegrationResult(const Spectrum &L);
	IntegrationResult(const Spectrum &L, 
		const vector<HistogramSample> &histogramSamples);

	IntegrationResult &operator+=(const IntegrationResult &rhs);
	inline IntegrationResult operator+(const IntegrationResult &rhs) const {
		return IntegrationResult(*this) += rhs;
	}

	Spectrum L;
	vector<HistogramSample> histogramSamples;
};


#endif // PBRT_CORE_INTEGRATIONRESULT_H
